{template "content","head"}
<!-- 主体 -->

<div class="container">
    <div class="mainOut">
        <div class="main public_2col">
            
            <div class="main_right grid_84 ov_h">
                <!-- InstanceBeginEditable name="EditRegion5" -->
                <div class="alltitle">
                <span class="crumbs">
                    您的位置： <a href="{siteurl($siteid)}" title="首页">首页</a>
                    &nbsp;>&nbsp;{catpos($catid, $s = ' > ')}&nbsp;
                </span>

                </div>


                {if $catid==7}
                <link rel="stylesheet" href="{LAY_PATH}css/layui.css">
                <div class="right">
                    <h2 style="font-size: 25px;margin-bottom: 20px"></h2>
                    <form id="form" class="layui-form">
                        <table class="layui-table" style="width: 600px;margin:auto">

                            <tr>
                                <td>公司名称</td>
                                <td><input name="company" class="layui-input" type="text"></td>
                            </tr>
                            <tr>
                                <td>联系人</td>
                                <td><input name="username" class="layui-input" type="text"></td>
                            </tr>
                            <tr>
                                <td>电话</td>
                                <td><input name="phone" class="layui-input" type="text"></td>
                            </tr>
                            <tr>
                                <td>Q Q</td>
                                <td><input name="qq" class="layui-input" type="text"></td>
                            </tr>
                            <tr>
                                <td>留言</td>
                                <td><textarea name="content" id="" cols="60" rows="6"></textarea></td>
                            </tr>

                            <tr>
                                <td>验证码：{form::checkcode('code_img', '4', '18', 84, 30)}</td>
                                <td><input name="code" class="layui-input" type="text"></td>
                            </tr>
                            <tr>
                                <td colspan="2"><button type="button" class="layui-btn tijiao1" style="background: #0643ad">提交</button></td>
                            </tr>
                            <input type="hidden" name="dosubmit" value="1">
                            <input type="hidden" name="ip" value="{ip()}">
                        </table>
                    </form>
                </div>
				{elseif $catid==4}
				<div class="news_list right_main pt25 pb15">
					<div>
					<form action="/index.php?m=search" method="get" style="text-align:center">
						<input type="text" name="q" placeholder="请输入关键字" style="padding:5px 8px;" /> 
						<input type="hidden" value="0" name="category"/>
						<input type="hidden" name="t" value="num"/>
						<input type="hidden" name="m" value="search"/>
						<input type="hidden" name="c" value="index"/>
						<input type="hidden" name="a" value="init"/>
						<input type="hidden" name="typeid" value="" id="typeid"/>
						<input type="hidden" name="siteid" value="1" id="siteid"/>
						<input type="submit" value="搜索" style="padding:5px 8px;" />
					</form>
					</div>
				</div>
                {else}
                <div class="news_list right_main pt25 pb15">
                    <h3 class="in_title" style="text-align:center;"> {$title}</h3>
                    <p style="color:#999;font-size:14px;text-align:center;">{$inputtime} </p>
                    <div class="neirong">
                        {if $content}
						{$content}
						{else}
						{pc:content action="category" catid="$catid" order="listorder asc" num="1"}
						{loop $data $r}
						{pc:get sql="select content from sy_page where catid=$r[catid]" return="data1"}
						{$data1[0][content]}
						{/pc}
						{/loop}
						
						{/pc}
						{/if}
                    </div>
                    <div class="clear"></div>
				<style>
					.address{
						width:40%;
						float:left;
					}
					.ditu{
						width:56%;
						float:right;
					}
					.cle{
						clear:both;
						border-top:1px solid #999;
					}
					.jingli span{
						display:inline-block;
						margin-left:45px;
						width:200px;
						font-size:14px;
					}
					.er img{
						margin:10px 0 0 45px;
					}
				</style>
                </div>
                {/if}
            </div>
			<div class="main_left grid_23 floatR ov_h">
                <div class="classify">
                    <h3>
                        {$CATEGORYS[$catid][catname]}
                        <p>{$CATEGORYS[$catid][catdir]}</p>
                    </h3>
                    <ul>
                        {pc:content action="category" catid="7" order="listorder asc"}
                        {loop $data $r}
                        <li  class="current">
                            <a href="{$r[url]}" title="{$r[catname]}" target="_self" class="{if $catid==$r[catid]}cur{/if}">{$r[catname]}</a>
                        </li>
                        {/loop}
                        {/pc}
                    </ul>
                </div>
                {template "content","right"}

            </div>
            <!--End left-->
        </div>
    </div>
    <!--End right-->
</div>
<script src="/statics/layui/layui.js"></script>
<script>
    $("#code").focus(function(){
        $(".myform").css('display','block')
    });
    $("#code").blur(function(){
        $(".myform").css('display','none')
    });
    layui.use(['form','layer'],function(){
        $('.tijiao1').click(function () {
            $.ajax({
                url:'index.php?m=webman&c=liuyan&a=add',
                type:'post',
                data:$('#form').serialize(),
                success:function(msg){
                    if(msg=='ok'){
                        layer.msg('提交成功，谢谢！',{icon:1}, function () {
                            location.reload()
                        });

                    }else if(msg=='fail'){
                        layer.msg('提交失败，请联系管理员',{icon:2});
                    }else{
                        layer.msg(msg,{icon:2})
                    }
                }
            })
        });
        $('.tijiao2').click(function () {
            $.ajax({
                url:'index.php?m=webman&c=liuyan&a=add',
                type:'post',
                data:$('#form2').serialize(),
                success:function(msg){
                    if(msg=='ok'){
                        layer.msg('提交成功，谢谢！',{icon:1});
                        location.reload()
                    }else if(msg=='fail'){
                        layer.msg('提交失败，请联系管理员',{icon:2});
                    }else{
                        layer.msg(msg,{icon:2})
                    }
                }
            })
        })
    })
</script>
{template "content","foot"}